import { defineStore } from 'pinia';
import useAppStore from '../app';

const useSelectionStore = defineStore('selection', {
	state: () => ({
		questionTypes: [{
			label: '单选题',
			value: 'SINGLE'
		}, {
			label: '多选题',
			value: 'MULTIPLE'
		}, {
			label: '判断题',
			value: 'JUDGE'
		}],
		difficultys: [{
			label: '简单',
			value: 'SIMPLE'
		}, {
			label: '中等',
			value: 'MEDIUM'
		}, {
			label: '困难',
			value: 'DIFFICULTY'
		}],
		letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
		courseStates: [{
			value: '1',
			label: '启用'
		}, {
			value: '2',
			label: '禁用'
		}],
		permissionTypes: [{
			value: 'MENU',
			label: '菜单'
		}, {
			value: 'BTN',
			label: '按钮'
		}, {
			value: 'DIRECTORY',
			label: '目录'
		}],

		questionUses: [{
			value: '1',
			label: '练习'
		}, {
			value: '2',
			label: '考试'
		}],
		isLockings: [{
			value: '1',
			label: '锁定'
		}, {
			value: '2',
			label: '未锁定'
		}],
		sexs: [{
			value: 'M',
			label: '男'
		}, {
			value: 'F',
			label: '女'
		}],

	}),

	getters: {
		selectionInfo(state: UserState): UserState {
			return { ...state
			};

		},
	},

	actions: {

	},
});

export default useSelectionStore;